import { createRequest } from './index';

// 学生任务列表
export const getStudentTaskList = data => {
  return createRequest({
    url: `/student/project-task/page`,
    method: 'get',
		params: data
  })
}

//学生根据id查询详情
export const getStudentTaskDetailById = id => {
  return createRequest({
    url: `/student/project-task/findById/${id}`,
    method: 'get',
  })
}

//学生提交任务
export const studentSubmitTask = (data,id)=> {
  return createRequest({
    url: `/student/project-task/submitTask/${id}`,
    method: 'post',
		data
  })
}





// 教师任务列表
export const getTeacherTaskList = data => {
  return createRequest({
    url: `/teacher/project-task/page`,
    method: 'get',
		params: data
  })
}

//批量添加任务
export const addTasks = data => {
  return createRequest({
    url: `/teacher/project-task/assignTasksBatch/${projectId}`,
    method: 'post',
		data
  })
}